package com.ossjk.core.base.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.enums.FieldFill;
import io.swagger.annotations.ApiModelProperty;

public abstract class BaseEntity<T extends Model> extends Model<T> {
    @ApiModelProperty(name = "id", dataType = "String", value = "主键id")
    @TableId("id")
    protected String id;

    /**
     * 创建时间
     */
    @ApiModelProperty(name = "crtm", dataType = "Date", value = "创建时间")
    @TableField(value = "crtm", fill = FieldFill.INSERT)
    protected Date crtm;
    /**
     * 修改时间
     */
    @ApiModelProperty(name = "mdtm", dataType = "Date", value = "修改时间")
    @TableField(value = "mdtm", fill = FieldFill.INSERT_UPDATE)
    protected Date mdtm;

    /**
     * 创建人
     */
    @ApiModelProperty(name = "crer", dataType = "String", value = "创建人")
    @TableField(value = "crer", fill = FieldFill.INSERT)
    protected String crer;

    /**
     * 修改人
     */
    @ApiModelProperty(name = "mder", dataType = "String", value = "修改人")
    @TableField(value = "mder", fill = FieldFill.INSERT_UPDATE)
    protected String mder;

    /**
     * 状态 1-业务数据、2-系统数据
     */
    @ApiModelProperty(name = "state", dataType = "BigDecimal", value = "状态 1-业务数据、2-系统数据")
    @TableField(value = "state", fill = FieldFill.INSERT)
    protected BigDecimal state;

    /**
     * 逻辑删除 1-未删除、2-已删除
     */
    @ApiModelProperty(name = "isdelete", dataType = "BigDecimal", value = "逻辑删除 1-未删除、2-已删除")
    @TableLogic
    @TableField(value = "isdelete", fill = FieldFill.INSERT)
    protected BigDecimal isdelete;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCrtm() {
        return crtm;
    }

    public void setCrtm(Date crtm) {
        this.crtm = crtm;
    }

    public Date getMdtm() {
        return mdtm;
    }

    public void setMdtm(Date mdtm) {
        this.mdtm = mdtm;
    }

    public String getCrer() {
        return crer;
    }

    public void setCrer(String crer) {
        this.crer = crer;
    }

    public String getMder() {
        return mder;
    }

    public void setMder(String mder) {
        this.mder = mder;
    }

    public BigDecimal getState() {
        return state;
    }

    public void setState(BigDecimal state) {
        this.state = state;
    }

    public BigDecimal getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(BigDecimal isdelete) {
        this.isdelete = isdelete;
    }

}
